package com.example.everying.model.entity.user;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;

/**
 * 积分流水实体类
 */
@Data
@TableName("points_transaction")
public class PointsTransaction {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID")
    private Long id;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private String userId;

    /**
     * 交易流水号
     */
    @ApiModelProperty(value = "交易流水号")
    private String transactionNo;

    /**
     * 积分变动值
     */
    @ApiModelProperty(value = "积分变动值")
    private Integer pointsChange;

    /**
     * 交易类型
     */
    @ApiModelProperty(value = "交易类型: 1-增加 2-减少")
    private Integer transactionType;
    /**
     * 交易类型
     */
    @ApiModelProperty(value = "活动类型；配置表里面的type")
    private String activityType;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;
}